Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix summary case card issues. (PT-188001359) #1526

Merged
merged 38 commits into from
Oct 8, 2024
Merged

Conversation

lublagg
Copy link
Contributor

@lublagg lublagg commented Oct 1, 2024

Addresses the following issues:

  • Bottom button font size
  • If you drag over a selection of cases in a graph, then the data card view should go into summary mode, but just be a summary of those selected cases.
  • If you navigate at one of the parent levels, the automatically selects all of the cases present in the child cards, so, since a selection of more than one case occurs, it should go into summary mode.

I also noticed some other bugs while working on the above that were all tied to how we were keeping track of the summarizedCollections and whether or not to show the summary view. Instead of having the components pass back information to the model to update the summarizedCollections prop on the Case Card model, summarizedCollections is now a view on the model that updates whenever there is a change in the selected cases.

@lublagg lublagg requested a review from emcelroy October 1, 2024 16:33
Copy link

codecov bot commented Oct 1, 2024

Codecov Report

Attention: Patch coverage is 94.61538% with 7 lines in your changes missing coverage. Please review.

Project coverage is 85.32%. Comparing base (6b5716b) to head (e09269b).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
v3/src/components/case-card/case-card-header.tsx 95.38% 3 Missing ⚠️
v3/src/components/case-card/case-card-model.ts 93.75% 3 Missing ⚠️
v3/src/components/case-card/card-view.tsx 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1526      +/-   ##
==========================================
- Coverage   85.34%   85.32%   -0.02%     
==========================================
  Files         570      571       +1     
  Lines       28496    28549      +53     
  Branches     7814     7330     -484     
==========================================
+ Hits        24319    24360      +41     
- Misses       3873     4033     +160     
+ Partials      304      156     -148     
Flag Coverage Δ
cypress 74.81% <97.32%> (+<0.01%) ⬆️
jest 53.20% <12.30%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

cypress bot commented Oct 1, 2024

codap-v3    Run #4564

Run Properties:  status check passed Passed #4564  •  git commit e484a692d0: Merge pull request #1526 from concord-consortium/188001359-fix-summary-bugs
Project codap-v3
Run status status check passed Passed #4564
Run duration 09m 14s
Commit git commit e484a692d0: Merge pull request #1526 from concord-consortium/188001359-fix-summary-bugs
Committer lublagg
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 30
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 228

@lublagg lublagg changed the title Fix selection issues + button text size. (PT-188001359) Fix summary case card issues. (PT-188001359) Oct 1, 2024
@kswenson kswenson added the v3 CODAP v3 label Oct 1, 2024
@lublagg lublagg requested a review from kswenson October 3, 2024 18:42
lublagg and others added 16 commits October 4, 2024 11:49
* Splits header into two lines. There is a bug with editing attribute header text.

* Fixes bug where header doesn't update after rename

* Adds logic so that line 1 always shows 1 word

Adds css styling so line doesn't wrap word, and line 2 shows ellipsis on left side.

* fix merge conflict error

* Fixes broken cypress test in table

* Fixes logic for showing attribute units as undefined if there are no units

* Adds padding buffer to button width

Adds logic that if there is only one attribute name and it overflows, don't make it appear in the 2nd line.

* Adds wrap styling for one word headers

* PR fixes

* Adds code to styling of attribute header line 2
* Adds formula column background color

* Adds formula background styling to case card value cell.

Disables value editing when attribute has a formula

* Adds Cypress test to verify background color when attribute is a formula

Splits case card test to 2 context so mouseSensor does not interfere with attribute menu clicks

* PR fix
* Adds a pointer capture on component drag

* remove commented out code

* PR fix
Copy link
Contributor

@emcelroy emcelroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good to me 👍 Changes to the card code make sense and everything seems to work well in the browser.

I left a few comments that I don't think should hold up merging this in, but I do wonder about all the changes here. I think something got a little mixed up with the commit history. Did you maybe merge main into your branch? I'm not sure but think Kirk may want to clean that up before this gets merged in.

There are also conflicts reported in a few files that will need to be fixed.

v3/cypress/e2e/case-card.spec.ts Outdated Show resolved Hide resolved
Comment on lines 24 to 32
cy.wait(100)
toolbar.getUndoTool().click()
cy.wait(100)
c.getComponentTitle(kTextTileTestId).should("have.text", textDefaultTitle)

// Redo title change
toolbar.getRedoTool().should("be.enabled")
toolbar.getRedoTool().click()
cy.wait(100)
Copy link
Contributor

@emcelroy emcelroy Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to take out these added waits since they don't seem to have helped and the test is now disabled?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that the waits should be removed unless they've been determined to be necessary (in which case there's probably a better solution anyway).

Copy link
Contributor Author

@lublagg lublagg Oct 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't add these in -- these changes came in when I merged in main. I think if they're on main then maybe it would make sense to make another PR to get rid of them, since it's not necessarily pertinent to this work.

v3/cypress/support/e2e.ts Outdated Show resolved Hide resolved
v3/src/components/case-card/card-view.scss Outdated Show resolved Hide resolved
Conflicts:
	v3/build_number.json
	v3/cypress/e2e/case-card.spec.ts
	v3/src/models/data/data-set.ts
	v3/src/models/data/filtered-cases.ts
@kswenson
Copy link
Member

kswenson commented Oct 7, 2024

Did you maybe merge main into your branch? I'm not sure but think Kirk may want to clean that up before this gets merged in.

There are also conflicts reported in a few files that will need to be fixed.

I merged from main and dealt with the conflicts.

Copy link
Member

@kswenson kswenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good -- I added a commit which merged main into the PR branch, simplified the summarizedCollections() computation, and tweaked a couple of other things. One thing to note is that if there is only one case in a collection, it needn't be summarized even if nothing is selected.

@lublagg lublagg requested a review from kswenson October 7, 2024 21:23
Copy link
Member

@kswenson kswenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Changes LGTM

@kswenson
Copy link
Member

kswenson commented Oct 8, 2024

I gave my approval, but @emcelroy's comments should still be considered/addressed.

@lublagg lublagg merged commit e484a69 into main Oct 8, 2024
11 checks passed
@lublagg lublagg deleted the 188001359-fix-summary-bugs branch October 8, 2024 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3 CODAP v3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants